<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>

<?php 
 if(isset($_POST['vitri'])) { ?>
<?php
$data=array();
$data[]=array(
	'layout_id'		=>	1,
	'position'		=>	$_POST['vitri'],
	'status'		=>	1,
	'sort_order'	=>	$_POST['thutu']
);
$data[]=array(
	'layout_id'		=>	2,
	'position'		=>	$_POST['vitri'],
	'status'		=>	1,
	'sort_order'	=>	$_POST['thutu']
);

echo serialize($data);
?>
<?php } else { ?>
<form id="form1" name="form1" method="post" action="insert_module.php"> 
  <label for="vitri2">Vi tri</label>
  <select name="vitri" id="vitri2">
    <option value="0">Vui long chon</option>
    <option value="left">Trai</option>
    <option value="right">Phai</option>
    <option value="home">Giua</option>
  </select>
  <label for="thutu">Thu tu</label>
  <input type="text" name="thutu" id="thutu" />
  <input type="submit" name="button" id="button" value="Submit" />
</form>
<?php } ?>
</body>
</html>